//
//  BankCardTableViewCell.m
//  SeaMelonSeeds_Counselor
//
//  Created by 尤振宇 on 2017/7/25.
//  Copyright © 2017年 杨笑. All rights reserved.
//

#import "BankCardTableViewCell.h"
#import "Tool.h"

@implementation BankCardTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    [self.backView roundedCorners_10PX];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setType:(BankCardTableViewCellType)type code:(NSString *)code
{
    switch (type) {
        case GuangDa_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"guangda"];
            self.backView.backgroundColor = [@"550066" colorWithHexString];
            self.name.text = @"光大银行";
        }
            break;
        case HuaXia_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"huaxia"];
            self.backView.backgroundColor = [@"dd2222" colorWithHexString];
            self.name.text = @"华夏银行";
        }
            break;
        case JiaoTong_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"jiaotong"];
            self.backView.backgroundColor = [@"003377" colorWithHexString];
            self.name.text = @"交通银行";
        }
            break;
        case PuDong_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"pudong"];
            self.backView.backgroundColor = [@"003473" colorWithHexString];
            self.name.text = @"浦东发展银行";
        }
            break;
        case ShenFaZhan_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"shenfazhan"];
            self.backView.backgroundColor = [@"0082c0" colorWithHexString];
            self.name.text = @"深圳发展银行";
        }
            break;
        case XingYe_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"xingye"];
            self.backView.backgroundColor = [@"224488" colorWithHexString];
            self.name.text = @"兴业银行";
        }
            break;
        case YouZheng_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"youzheng"];
            self.backView.backgroundColor = [@"006644" colorWithHexString];
            self.name.text = @"邮政储蓄银行";
        }
            break;
        case ZhaoShang_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"zhaoshang"];
            self.backView.backgroundColor = [@"ce0000" colorWithHexString];
            self.name.text = @"招商银行";
        }
            break;
        case GongShang_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"gongshang"];
            self.backView.backgroundColor = [@"cc0000" colorWithHexString];
            self.name.text = @"工商银行";
        }
            break;
        case JianShe_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"jianshe"];
            self.backView.backgroundColor = [@"0d409b" colorWithHexString];
            self.name.text = @"建设银行";
        }
            break;
        case MingSheng_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"mingsheng"];
            self.backView.backgroundColor = [@"069984" colorWithHexString];
            self.name.text = @"民生银行";
        }
            break;
        case NongYe_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"nongye"];
            self.backView.backgroundColor = [@"009988" colorWithHexString];
            self.name.text = @"农业银行";
        }
            break;
        case ZhongGuoYinHang_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"zhongguoyinhang"];
            self.backView.backgroundColor = [@"b30000" colorWithHexString];
            self.name.text = @"中国银行";
        }
            break;
        case ZhongXin_BankCardTableViewCellType:
        {
            self.image.image = [UIImage imageNamed:@"zhongxin"];
            self.backView.backgroundColor = [@"dd3322" colorWithHexString];
            self.name.text = @"中信银行";
        }
            break;
            
        default:
            break;
    }
    self.code.text = code;
}

@end
